<template>
	<div>
		<ProTable ref="proTable" title="购物车" :columns="columns" :requestApi="RequestCategoryList">
			<!-- 表格操作 -->
			<template #operation>
				<el-button type="primary" link :icon="View">查看</el-button>
				<el-button type="primary" link :icon="EditPen">编辑</el-button>
				<el-button type="primary" link :icon="Delete">删除</el-button>
			</template>
		</ProTable>
	</div>
</template>

<script setup lang="tsx">
import ProTable from '@/components/ProTable/index.vue'
import type { ColumnProps } from '@/components/ProTable/interface'
import type { Good } from '@/api/interface'
import { CirclePlus, Delete, EditPen, Download, Upload, View, Refresh } from '@element-plus/icons-vue'
import { api } from '@/api'
const { RequestCategoryList } = api
// 表格配置项
const columns: ColumnProps<Good.Category>[] = [
	{ type: 'selection', fixed: 'left', width: 80 },
	{ type: 'index', label: '#', width: 80 },
	{ prop: 'id', label: '序列号', width: 180 },
	{ prop: 'name', label: '分类名称' },
	{ prop: 'operation', label: '操作', fixed: 'right', width: 330 }
]
</script>

<style lang="scss" scoped></style>
